package com.pp.common.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain=true)
@TableName("user")
public class User extends BasePojo {

    @TableId(type= IdType.AUTO)
    private Integer id;

    private String username;
    private String password;
    private String salt;
    private String nickname;
    private Integer gender;
    private Integer age;
    private String phone;
    private String email;
    private String avatar; // 头像图片路径
    private String intro;
    private Integer followingNum;
    private Integer followerNum;
    private Integer userReportNum;
    private Integer userStatus;

    @TableField(exist=false) // 该属性在当前类对应的表中不存在
    private Role role; // 定义role角色数据

}
